<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>商家管理</title>
</head>
<body>
	<form
		action="${pageContext.request.contextPath }/Merchant/getMerchantInfo.shtml"
		method="post">
		查询条件：
		<table width="100%" border=1>
			<tr>
				<td><input type="text" name="shopName" placeholder="请输入商家" /></td>
				<td><input type="submit" value="查询" /></td>
			</tr>
		</table>
		商家列表：
		<table width="100%" border=1>
			<tr>
				<td>商家ID</td>
				<td>商家名称</td>
				<td>发货地址</td>
				<td>商家状态</td>
				<td>操作</td>
			</tr>
			<c:forEach items="${merchantList}" var="item">
				<tr>
					<td>${item.uId }</td>
					<td>${item.shopName }</td>
					<td>${item.shipAddress}</td>
					<td>${item.cashDeposit }</td>
					<td><a
						href="${pageContext.request.contextPath }/Merchant/editMerchant.shtml?id=${item.id}">修改</a></td>
				</tr>
			</c:forEach>
		</table>
		<ul>
			
			<!--上一页  -->
			<c:choose>
				<c:when test="${page.currentPageIndex>1}">
					<a
						href="${pageContext.request.contextPath}/Merchant/getMerchantInfo.shtml?currentPageIndex=${page.currentPageIndex-1}">
						<< </a>
				</c:when>
			</c:choose>
			
			<!-- 页面列表  -->
			<c:forEach items="${pageNumList}" var="num">
				<a
					href="${pageContext.request.contextPath}/Merchant/getMerchantInfo.shtml?currentPageIndex=${num}">${num}</a>
			</c:forEach>
			
			<!-- 下一页 -->
			<c:choose>
				<c:when test="${page.currentPageIndex<page.totalPages}">
					<a
						href="${pageContext.request.contextPath}/Merchant/getMerchantInfo.shtml?currentPageIndex=${page.currentPageIndex+1}">>></a>
				</c:when>
			</c:choose>
			&nbsp;&nbsp;&nbsp;总&nbsp;${page.totalPages}&nbsp;页&nbsp;&nbsp;&nbsp;
		</ul>
	</form>
</body>
</html>